home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / network / nsclilib / ncbinet.h next >
Text File  |  1996-07-05  |  6KB  |  172 lines

  1. /*      
  2. * ===========================================================================
  3. *
  4. *                            PUBLIC DOMAIN NOTICE                          
  5. *               National Center for Biotechnology Information
  6. *                                                                          
  7. *  This software/database is a "United States Government Work" under the   
  8. *  terms of the United States Copyright Act.  It was written as part of    
  9. *  the author's official duties as a United States Government employee and 
  10. *  thus cannot be copyrighted.  This software/database is freely available 
  11. *  to the public for use. The National Library of Medicine and the U.S.    
  12. *  Government have not placed any restriction on its use or reproduction.  
  13. *                                                                          
  14. *  Although all reasonable efforts have been taken to ensure the accuracy  
  15. *  and reliability of the software and data, the NLM and the U.S.          
  16. *  Government do not and cannot warrant the performance or results that    
  17. *  may be obtained by using this software or data. The NLM and the U.S.    
  18. *  Government disclaim all warranties, express or implied, including       
  19. *  warranties of performance, merchantability or fitness for any particular
  20. *  purpose.                                                                
  21. *                                                                          
  22. *  Please cite the author in any work or product based on this material.   
  23. *
  24. * ===========================================================================
  25. *
  26. * File Name:    ncbinet.h
  27. *
  28. * Author:       Beatty, Gish
  29. *
  30. * Version Creation Date:        1/1/92
  31. *
  32. * $Revision: 4.0 $
  33. *
  34. * File Description: 
  35. *
  36. *
  37. * Modifications:  
  38. * --------------------------------------------------------------------------
  39. * Date     Name        Description of modification
  40. * -------  ----------  -----------------------------------------------------
  41. *  5/12/92 Epstein     Converted tabs to spaces
  42. * 06/28/93 Schuler     Added extern "C" linkage specifier
  43. * 01/21/94 Schuler     Replaced
  44. *
  45. * ==========================================================================
  46. *
  47. *
  48. * RCS Modification History:
  49. * $Log: ncbinet.h,v $
  50.  * Revision 4.0  1995/07/26  13:56:32  ostell
  51.  * force revision to 4.0
  52.  *
  53.  * Revision 1.12  1995/05/17  17:51:52  epstein
  54.  * add RCS log revision history
  55.  *
  56. */
  57.  
  58. #ifndef _NCBINET_
  59. #define _NCBINET_
  60.  
  61. #ifdef __cplusplus
  62. extern "C" {
  63. #endif
  64.  
  65. #include "ni_types.h"   /* include <ncbi.h> */
  66. #include "ni_defin.h"
  67. #include "ni_error.h"
  68. #include "ni_encr.h"
  69.  
  70. #ifdef NETP_INET_MACTCP
  71. #include "macsockd.h"
  72. #define __TYPES__       /* avoid Mac <Types.h> */
  73. #define __MEMORY__      /* avoid Mac <Memory.h> */
  74. #define ipBadLapErr     /* avoid Mac <MacTCPCommonTypes.h> */
  75. #define APPL_SOCK_DEF
  76. #ifdef __NI_LIB__
  77. #define DONT_DEFINE_INET
  78. #else
  79. #define SOCK_DEFS_ONLY
  80. #endif
  81.  
  82. #include "sock_ext.h"
  83. extern void bzero PROTO((CharPtr target, long numbytes));
  84.  
  85. #endif /* NETP_INET_MACTCP */
  86.  
  87.  
  88. /* GLOBAL VARIABLES */
  89.  
  90. #if defined(OS_UNIX) || defined(NETP_INET_MACTCP)
  91. extern CharPtr  sys_errlist[];
  92. #ifndef _ERRNO
  93. extern int      errno;
  94. #endif
  95. #endif
  96.  
  97. #ifdef NETP_INET_MACTCP
  98. extern long     errno_long;
  99. #endif
  100.  
  101.  
  102. /* CLIENT FUNCTIONS */
  103.  
  104. extern NI_DispatcherPtr NI_SetDispatcher PROTO((NI_DispatcherPtr disp, CharPtr host, CharPtr svc, int timeout, Int4 uniqueSeqNo, ValNodePtr encryption));
  105.  
  106. extern Int2             NI_InitServices PROTO((NI_DispatcherPtr disp, CharPtr user, CharPtr group, CharPtr password, NI_DispInfoPtr PNTR dip));
  107.  
  108. NI_DispatcherPtr NI_GenericInit PROTO((CharPtr configFile, CharPtr configSection, Boolean showMonitor, CharPtr lastDispatcher, Int2 lastDispLen));
  109.  
  110. NI_HandPtr NI_GenericGetService PROTO((NI_DispatcherPtr disp, CharPtr configFile, CharPtr configSection, CharPtr defService, Boolean hasResource));
  111.  
  112. extern Int4             NI_SetDispConfig PROTO((NI_DispInfoPtr PNTR dip, CharPtr dispatcher, Int2 dispLen));
  113.  
  114. extern Int2             NI_EndServices PROTO((NI_DispatcherPtr disp));
  115.  
  116. extern NICatalogPtr     NI_GetCatalog PROTO((NI_DispatcherPtr disp));
  117.  
  118. extern ReqPtr           NI_SVCRequestBuild PROTO((NI_DispatcherPtr disp));
  119.  
  120. extern void             NI_SVCRequestDestroy PROTO((ReqPtr reqp));
  121.  
  122. extern NI_HandPtr       NI_ServiceGet PROTO((NI_DispatcherPtr disp, CharPtr svc, Uint2 svcvermin, Uint2 svcvermax, CharPtr res, CharPtr restype, Uint2 resvermin, Uint2 resvermax));
  123.  
  124. extern NI_HandPtr       NI_ServiceRequest PROTO((ReqPtr req));
  125.  
  126. extern Int2             NI_ServiceDisconnect PROTO((NI_HandPtr mhp));
  127.  
  128. extern int              NI_ServiceGetReadFd PROTO((NI_HandPtr mhp));
  129.  
  130. extern int              NI_ServiceGetWriteFd PROTO((NI_HandPtr mhp));
  131.  
  132. extern Int2             NI_RequestSetService PROTO((ReqPtr req, CharPtr name, Uint2 vermin, Uint2 vermax));
  133.  
  134. extern Int2             NI_RequestAddResource PROTO((ReqPtr req, CharPtr name, CharPtr type, Uint2 vermin, Uint2 vermax));
  135.  
  136. extern Int2             NI_GetPlatform PROTO((void));
  137.  
  138.  
  139. /* SERVER FUNCTIONS */
  140.  
  141. extern int              NI_ServerACK PROTO((void));
  142.  
  143. extern int              NI_ServerNACK PROTO((CharPtr err_text));
  144.  
  145. extern NI_HandPtr       NI_OpenASNIO PROTO((void));
  146.  
  147. extern Int2             NI_CloseASNIO PROTO((NI_HandPtr hp));
  148.  
  149. /* TIMER MANAGEMENT */
  150.  
  151. extern void             NI_ProcessTimers PROTO((void));
  152. extern time_t           NI_GetNextWakeup PROTO((void));
  153. extern NodePtr          NI_SetTimer PROTO((time_t timeout, NI_TimeoutHook hook, Pointer hookParam));
  154. extern void             NI_CancelTimer PROTO((NodePtr timerId));
  155.  
  156. /* MISC. FUNCTIONS */
  157.  
  158. extern void             NI_SetActivityHook PROTO((NI_NetServHook hook));
  159.  
  160. /* for internal network services use only */
  161. extern NI_NetServHook   NI_ActivityHook PROTO((void));
  162. extern void             WriteConFile PROTO((Uint4 conid));
  163.  
  164. extern void             NI_LogSocket PROTO((int sok, Boolean opening, CharPtr filename, int lineno));
  165. extern Int2             NI_SocketsOpen PROTO((void));
  166.  
  167. #ifdef __cplusplus
  168. }
  169. #endif
  170.  
  171. #endif
  172.